from base1 import Base
from time import sleep
from selenium.webdriver.common.by import By
class SouSuoPage(Base):
    sousuokuang=(By.XPATH,'//android.widget.TextView[@text="搜商品名称 作者 出版社 ISBN"]')
    shurukuang=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.EditText')
    sousuoanniu=(By.ID,'com.kongfz.app:id/tvSearch')
    duanyan=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout/android.widget.TextView')





    def sousuoyewu(self,neirong):
        self.find_ele(self.sousuokuang).click()
        sleep(5)
        self.find_ele(self.shurukuang).send_keys(neirong)
        sleep(5)
        self.find_ele(self.sousuoanniu).click()
        sleep(5)


